<template>
  <div class="detail">
    <OrderWrap :wrap="data" type="detail" />
    
    <OrderInfo :item="data" />
    <div class="footer" v-if="data.status != 1">
      <button class="handleBtn gray">删除订单</button>
    </div>
  </div>
</template>

<script>
import api from '../../api'
import common from '../../api/common'
import OrderWrap from "@/components/order/OrderWrap";
import OrderInfo from "@/components/order/OrderInfo";
export default {
  title: "订单详情",
  bodyClass: "gray-bg",
  components: { OrderWrap, OrderInfo },
  data() {
    return {
      data: {},
      id: common.getParam('id')
    };
  },
  methods: {
    loadDetail() {
      api.order.orderDetail(this.id, res => {
        this.data = res
      })
    }
  },
  mounted () {
    this.loadDetail()
  },

};
</script>

<style lang="less" scoped>
.footer {
  border-top: 1px solid #f2f2f2;
  background: #fff;
  padding: 4vw;
  width: 100%;
  position: fixed;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
}
</style>